import { request } from '@umijs/max';

// 选区服
export function GetRole() {
  return request('/chdtuan/GetRole.asp?from=39', {
    method: 'POST',
    data: {
      AreaID: 1,
      AreaName: '上海电信',
      ServerID: 8,
      ServerName: '哈密瓜',
    },
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  });
}

// 团购列表查询
export function index() {
  return request('/chdtuan/index.asp?from=39', {
    method: 'GET',
  });
}

// 团购列表查询
export function Check(data) {
  return request('/chdtuan/inc/Buy.Check.asp?from=39', {
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  });
}

// 订单查询
export function List_my(params) {
  return request('/chdtuan/List_my.asp?from=39&flag=1', {
    method: 'GET',
    params,
  });
}

// 登录
export function Login(id) {
  return request('/chdtuan/login.asp?from=39&ticket=' + id, {
    method: 'GET',
  });
}

// 查询Sign
export function buy(id) {
  return request('/chdtuan/buy.asp?from=39&id=' + id, {
    method: 'GET',
  });
}
